/**
 * LyricsPinyin.net - 主样式文件
 */

/* 全局样式 */
:root {
  --primary-color: #0891b2;
  --primary-dark: #0e7490;
  --secondary-color: #06b6d4;
  --accent-color: #10b981;
  --text-color: #1f2937;
  --light-gray: #f0f9ff;
  --dark-gray: #4b5563;
  --gradient-start: #0891b2;
  --gradient-end: #06b6d4;
}

body {
  font-family: 'Inter', 'Noto Sans', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #f8fafc;
}

/* 渐变文本样式 */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* 修复链接hover效果颜色 */
a:hover {
  text-decoration-color: var(--primary-color) !important;
}

/* 头部导航 */
.navbar {
  box-shadow: 0 4px 20px rgba(8, 145, 178, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.navbar.scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: rgba(255, 255, 255, 0.95);
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  text-shadow: 0 2px 4px rgba(8, 145, 178, 0.1);
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.nav-link:hover:after {
  width: 100%;
}

/* 语言切换器 */
.lang-switcher {
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-switcher:hover {
  color: var(--primary-color);
}

/* 英雄区域 */
.hero-section {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/static/images/music-notes.svg');
  background-repeat: repeat;
  background-size: 100px;
  opacity: 0.08;
}

.hero-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
}

.search-container {
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.recommended-search {
  cursor: pointer;
  transition: all 0.3s ease;
}

.recommended-search:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* 按钮效果 - 确保文字颜色正确 */
.btn-hover-effect {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  transition: all 0.3s ease;
  color: white !important;
}

.btn-hover-effect:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(8, 145, 178, 0.3);
  color: white !important;
}

.btn-hover-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-hover-effect:hover::after {
  width: 300px;
  height: 300px;
}

/* 搜索按钮特殊处理 */
#search-button {
  color: white !important;
  background: linear-gradient(to right, #06b6d4, #2563eb) !important;
}

#search-button:hover {
  color: white !important;
  background: linear-gradient(to right, #0891b2, #1d4ed8) !important;
}

/* 确保搜索按钮图标也是白色 */
#search-button i {
  color: white !important;
}

/* 搜索按钮的Tailwind类覆盖 */
button.bg-gradient-to-r {
  background: linear-gradient(to right, #06b6d4, #2563eb) !important;
  color: white !important;
}

button.bg-gradient-to-r:hover {
  background: linear-gradient(to right, #0891b2, #1d4ed8) !important;
  color: white !important;
}

/* 歌词卡片 */
.lyric-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(8, 145, 178, 0.1);
}

.lyric-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(8, 145, 178, 0.15);
  border-color: var(--secondary-color);
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 特性卡片 */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(8, 145, 178, 0.1);
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(8, 145, 178, 0.15);
}

.feature-icon {
  transition: transform 0.5s ease, color 0.3s ease;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(5deg);
}

/* 确保特性图标容器中的图标是白色 */
.feature-card .bg-gradient-to-br i {
  color: white !important;
}

/* 歌词卡片中的图标 */
.lyric-card .bg-gradient-to-br i {
  color: white !important;
}

/* 首页特性卡片中渐变背景容器的图标为白色 */
.feature-card .w-20.h-20.bg-gradient-to-br i {
  color: white !important;
}

/* 首页额外特性展示区域中渐变背景容器的图标为白色 */
.w-12.h-12.bg-gradient-to-br i {
  color: white !important;
}

/* 按钮hover效果中的图标为白色 */
.btn-hover-effect i {
  color: white !important;
}

/* 歌词卡片中音乐图标为白色 */
.lyric-card .w-12.h-12.bg-gradient-to-br i,
.lyric-card .w-10.h-10.bg-gradient-to-br i {
  color: white !important;
}

/* 底部Call to Action按钮中的图标为白色 */
.bg-gradient-to-r.from-cyan-500 i {
  color: white !important;
}

/* 确保About页面和Contact页面Call to Action区域的按钮图标为白色 */
.bg-gradient-to-r.from-cyan-500.to-blue-600 i,
.bg-white.text-cyan-600 i {
  color: inherit !important; /* 让白底按钮使用文字颜色 */
}

/* 修复：确保带有text-white类的渐变按钮中的图标显示为白色 */
.bg-gradient-to-r.from-cyan-500.to-blue-600.text-white i {
  color: white !important;
}

/* 确保所有带有text-white类的渐变按钮都显示白色图标 */
.bg-gradient-to-r.text-white i {
  color: white !important;
}

/* 确保白色背景按钮中的图标使用文字颜色 */
.bg-white.text-cyan-600 i {
  color: #0891b2 !important; /* 青色 */
}

.bg-white.text-cyan-700 i {
  color: #0e7490 !important; /* 深青色 */
}

/* 保持特性卡片底部彩色图标的原始颜色 */
.feature-card .text-green-500,
.feature-card .text-yellow-500,
.feature-card .text-blue-500,
.feature-card .text-red-500,
.feature-card .text-purple-500 {
  color: inherit !important;
}

/* 确保各种颜色的图标保持其原始颜色 */
.text-cyan-600 {
  color: #0891b2 !important;
}

.text-green-600 {
  color: #059669 !important;
}

.text-blue-600 {
  color: #2563eb !important;
}

.text-purple-600 {
  color: #9333ea !important;
}

/* 特别保护彩色状态图标 */
.text-green-500 {
  color: #10b981 !important;
}

.text-yellow-500 {
  color: #f59e0b !important;
}

.text-blue-500 {
  color: #3b82f6 !important;
}

.text-red-500 {
  color: #ef4444 !important;
}

.text-purple-500 {
  color: #8b5cf6 !important;
}

/* FAQ部分 */
.faq-question {
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border: 1px solid rgba(8, 145, 178, 0.1);
}

.faq-question:hover {
  background-color: var(--light-gray);
  border-color: var(--secondary-color);
}

.faq-answer {
  transition: all 0.3s ease;
  border-left: 3px solid var(--accent-color);
}

/* 分页 */
.pagination .active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
}

.pagination a {
  transition: all 0.3s ease;
  border: 1px solid rgba(8, 145, 178, 0.2);
}

.pagination a:hover:not(.active) {
  background-color: var(--light-gray);
  border-color: var(--secondary-color);
  transform: translateY(-1px);
}

/* 详情页 */
.song-details {
  border-left: 4px solid var(--accent-color);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.05), rgba(6, 182, 212, 0.05));
}

.lyrics-content {
  line-height: 1.2;
  padding: 1.5rem;
  background: rgba(240, 249, 255, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(8, 145, 178, 0.1);
}

.like-button {
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.like-button:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: scale(1.05);
}

.like-button.liked {
  color: #ec4899;
}

/* 页脚 */
.footer {
  background-color: #1f2937;
}

.footer-link {
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .feature-card {
    margin-bottom: 1.5rem;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* 搜索结果动画 */
#search-results {
  transition: all 0.5s ease;
}

/* 移动菜单 */
.mobile-menu {
  transition: transform 0.3s ease;
  transform: translateX(-100%);
}

.mobile-menu.open {
  transform: translateX(0);
}

/* 面包屑导航 */
.breadcrumb {
  background-color: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
}

/* 标签样式 */
.tag {
  background-color: #e5e7eb;
  color: var(--dark-gray);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background-color: var(--primary-color);
  color: white;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
} 